package com.ibeeking.found.cop.service.common.enums;

public enum WxCpMessageTypeEnum {
    MESSAGE_CHAT_TYPE_SINGLE("single", "发送给客户"),
    MESSAGE_CHAT_TYPE_GROUP("group", "发送给客户群"),
    MESSAGE_MOMENT_TYPE_ADD_TASK("add_moment_task", "操作类型"),
    ;
    private String code;
    private String desc;

    WxCpMessageTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(String code) {
        for (WxCpMessageTypeEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
